package com.wn55.hrms.mapper;

import com.wn55.hrms.entity.Statistical;
import com.wn55.hrms.service.vo.StatisticalVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StatisticalMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Statistical record);

    Statistical selectByPrimaryKey(Integer id);

    List<Statistical> selectAll();

    int updateByPrimaryKey(Statistical record);

    List<StatisticalVo> selectConds(String uname);


    @Insert(value = "insert into statistical (date,uname,count,isdelete) values (#{date},#{uname},#{count},0)")
    @Options(useGeneratedKeys = true,keyProperty ="id",keyColumn = "id")
    void insertStatistical(Statistical statistical);
}